package com.ccp.dev.system.service;

import com.ccp.dev.core.basic.base.BaseService;
import com.ccp.dev.system.dao.SysTenantOrgDao;
import com.ccp.dev.system.model.SysTenantOrg;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 租户与组织关联service
 * @author niudong
 */
@Service
public class SysTenantOrgService extends BaseService<SysTenantOrg> {

    @Resource
    private SysTenantOrgDao sysTenantOrgDao;

    /**
     * 根据组织id查询所属租户id
     * @param orgId 组织id
     * @return 租户id
     */
    public String getTenantIdByOrgId(String orgId){
        return sysTenantOrgDao.getTenantIdByOrgId(orgId);
    }

}
